home *** CD-ROM | disk | FTP | other *** search
- global objlist, objfglist, cardlist, missmarklist
-
- on trumpinit
- set objlist to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- set objfglist to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- set cardlist to [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]
- set missmarklist to [0, 0, 0, 0, 0, 0]
- definecardlist()
- repeat with i = 1 to 24
- set thisobj to new(script "trumpScript", i + 4)
- setAt(objlist, i, thisobj)
- setAt(objfglist, i, 1)
- puppetSprite(tempsprite, 1)
- set the stretch of sprite (i + 5) to 1
- end repeat
- repeat with i = 30 to 35
- puppetSprite(i, 1)
- set the visible of sprite i to 0
- end repeat
- end
-
- on definecardlist
- set cardapearlist to [1: 0, 2: 0, 3: 0, 4: 0, 5: 0, 6: 0, 7: 0, 8: 0, 9: 0, 10: 0, 11: 0, 12: 0]
- set definedcard to 1
- repeat while definedcard < 25
- set tempcardnum to random(12)
- set apearance to getProp(cardapearlist, tempcardnum)
- if apearance < 2 then
- setAt(cardlist, definedcard, tempcardnum)
- setProp(cardapearlist, tempcardnum, apearance + 1)
- set definedcard to definedcard + 1
- end if
- end repeat
- end
-